package com.joe.updemo.http.service;

import com.google.gson.JsonObject;
import com.joe.updemo.http.dataStructure.BasicResponse;
import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.*;

import java.util.Map;

/**
 * Created by Administrator on 2018/1/15.
 */

public interface ApiInterface {
    @Headers("Content-Type:application/json;charset=UTF-8")
    @POST()
    Observable<BasicResponse<JsonObject>> post(@Url String url, @Body RequestBody requestBody);

    @Headers("Content-Type:application/json;charset=UTF-8")
    @GET()
    Observable<BasicResponse<JsonObject>> get(@Url String url, @QueryMap Map<String, String> params);

}